<html>
<head><meta charset="utf-8"><title>current global allocator · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/current.20global.20allocator.html">current global allocator</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221469057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/current%20global%20allocator/near/221469057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/current.20global.20allocator.html#221469057">(Jan 03 2021 at 20:20)</a>:</h4>
<p>is there a way to access the current global allocator, whether it be system or overridden?</p>



<a name="221469347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/current%20global%20allocator/near/221469347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/current.20global.20allocator.html#221469347">(Jan 03 2021 at 20:26)</a>:</h4>
<p>what do you mean exactly by 'access'?</p>



<a name="221469543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/current%20global%20allocator/near/221469543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/current.20global.20allocator.html#221469543">(Jan 03 2021 at 20:31)</a>:</h4>
<p>get a reference to it</p>



<a name="221469611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/current%20global%20allocator/near/221469611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/current.20global.20allocator.html#221469611">(Jan 03 2021 at 20:32)</a>:</h4>
<p>aha i see there is <a href="https://doc.rust-lang.org/std/alloc/struct.Global.html">https://doc.rust-lang.org/std/alloc/struct.Global.html</a>, that seems to be the purpose of it</p>



<a name="221475641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/current%20global%20allocator/near/221475641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steven Fackler <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/current.20global.20allocator.html#221475641">(Jan 03 2021 at 22:54)</a>:</h4>
<p>the stable interface is the free functions in the alloc module</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>